#ifndef PCRTABLE_H
#define PCRTABLE_H

#include <QTableWidget>
#include <QTableWidgetItem>

#include <QHeaderView>
#include <QVBoxLayout>
#include <QEvent>
#include <QMouseEvent>
#include <QDebug>
#include <QException>

#include "pcrState.h"

// 表格
class PCRTable : public QWidget
{
   Q_OBJECT
public:
    PCRTable(QStringList header, QWidget* parent = nullptr);

    int setData(const QVector<QVector<QString>> &data);


    QVector<QString>  filterData(QVector<QSet<QString>> filterRule);
    QTableWidget* getTable();

    void init(PCRState* state);


public slots:
    void on_pageChanged();
    void on_filterChanged();
    void on_thrChanged();
    void on_modelChanged();
    void on_standardChanged();

    // 内部信号
    void on_selectionChanged();





private:


    PCRState*       pState;

    QVBoxLayout*    _layout = nullptr;
    QTableWidget*   _table = nullptr;

    QVector<QSet<QString>>      _filterList;
    QVector<QSet<QString>>      _filterRule;


};

#endif // PCRTABLE_H
